
REM  ----  The NMR2 Adventure  *.CMD file

COMMAND ANY        
FlagOFF 13 ; Flag number 13 is OFF?
SetVariableTo 4 60 ; Set variable number 4 to 60
SetVariableTo 5 70 ; Set variable number 5 to 70
SetVariableTo 6 80 ; Set variable number 6 to 80
SetVariableTo 7 90 ; Set variable number 7 to 90
END_COMMAND

COMMAND ANY        
FlagOFF 13 ; Flag number 13 is OFF?
SetVariableTo 8 100 ; Set variable number 8 to 100
SetVariableTo 9 110 ; Set variable number 9 to 110
SetVariableTo 10 120 ; Set variable number 10 to 120
SetVariableTo 11 130 ; Set variable number 11 to 130
SetVariableTo 12 140 ; Set variable number 12 to 140
TurnFlagON 13 ; Turn flag number 13 ON
END_COMMAND

COMMAND ANY        
Present 203 ; LAB COAT is here?
NOT Present 204 ; COAT POCKET is NOT here?
DropIt 204 ; Drop noun 204 -- COAT POCKET
END_COMMAND

COMMAND ANY        
NOT AtLocation 3 ; Player is NOT located at East Corridor
 OR 
IsWearing 205 ; SECURITY BADGE is being worn?
TurnCounterOFF 1 ; Turn counter number 1 OFF
CounterEquals 1 0 ; Counter number 1 is equal to 0?
END_COMMAND

COMMAND ANY        
CounterEquals 1 5 ; Counter number 1 is equal to 5?
PrintMessage 4 ; Suddenly, the guard loses his patience.  Seemingly
Destroy 300 ; Destroy noun (HOSTILE SECURITY GUARD)
KillPlayer ; Kill Player at end of turn!
DoneWithTurn
END_COMMAND

COMMAND ANY        
AtLocation 3 ; Player is located at East Corridor
NOT IsWearing 205 ; SECURITY BADGE is NOT being worn?
NOT Present 300 ; HOSTILE SECURITY GUARD is NOT here?
PrintMessage 1 ; The security guard walks out from his alcove and b
DropIt 300 ; Drop noun 300 -- HOSTILE SECURITY GUARD
TurnCounterON 1 ; Turn counter number 1 ON
END_COMMAND

COMMAND ANY        
AtLocation 3 ; Player is located at East Corridor
Present 300 ; HOSTILE SECURITY GUARD is here?
IsWearing 205 ; SECURITY BADGE is being worn?
PrintMessage 3 ; The guard notices that you are now wearing your se
Destroy 300 ; Destroy noun (HOSTILE SECURITY GUARD)
END_COMMAND

COMMAND ANY        
AtLocation 4 ; Player is located at Guard's Alcove
NOT IsWearing 205 ; SECURITY BADGE is NOT being worn?
Present 302 ; FRIENDLY SECURITY GUARD is here?
Destroy 302 ; Destroy noun (FRIENDLY SECURITY GUARD)
PutInCurrentRoom 300 ; Put noun (HOSTILE SECURITY GUARD) in current room
END_COMMAND

COMMAND ANY        
AtLocation 4 ; Player is located at Guard's Alcove
IsWearing 205 ; SECURITY BADGE is being worn?
Present 300 ; HOSTILE SECURITY GUARD is here?
Destroy 300 ; Destroy noun (HOSTILE SECURITY GUARD)
DropIt 302 ; Drop noun 302 -- FRIENDLY SECURITY GUARD
END_COMMAND

COMMAND ANY        
FlagOFF 11 ; Flag number 11 is OFF?
NOT AtLocation 2 ; Player is NOT located at Office          
NOT AtLocation 3 ; Player is NOT located at East Corridor
PlusScore 25 ; Add 25 to game score
TurnFlagON 11 ; Turn flag number 11 ON
END_COMMAND

COMMAND ANY        
FlagOFF 2 ; Flag number 2 is OFF?
NOT AtLocation 2 ; Player is NOT located at Office          
NOT AtLocation 3 ; Player is NOT located at East Corridor
RandomVariable 2 ; Set variable number 2 to a random number from 1 to 4
VariableGT 2 1 ; Variable number 2 is equal to 1?
DropIt 303 ; Drop noun 303 -- HOSTILE ALIEN
PrintMessage 8 ; Suddenly, an ugly, green alien enters the room.  Y
TurnFlagON 2 ; Turn flag number 2 ON
END_COMMAND

COMMAND ANY        
CounterEquals 2 20 ; Counter number 2 is equal to 20?
SwapLocations 304 305 ; Swap locations of nouns  (PURCHASING SECRETARY) and (BLACK CROW)
TurnCounterOFF 2 ; Turn counter number 2 OFF
AtLocation 9 ; Player is located at Purchasing Secretary's Office
PrintMessage 12 ; Suddenly, the crow turns back into a secretary.  I
END_COMMAND

COMMAND ANY        
AtLocation 7 ; Player is located at Lunch Room
FlagOFF 6 ; Flag number 6 is OFF?
TurnCounterON 3 ; Turn counter number 3 ON
TurnFlagON 6 ; Turn flag number 6 ON
END_COMMAND

COMMAND ANY        
Present 306 ; NMR SALESMAN is here?
NOT CounterEquals 3 8 ; Counter number 3 is NOT equal to 8?
PrintMessage 16 ; The NMR salesman continues to talk without ceasing
END_COMMAND

COMMAND ANY        
CounterEquals 3 8 ; Counter number 3 is equal to 8?
NOT Present 307 ; HOSTILE ALIEN is NOT here?
PrintMessage 17 ; The NMR salesman has talked to you so long that yo
KillPlayer ; Kill Player at end of turn!
DoneWithTurn
END_COMMAND

COMMAND ANY        
Present 307 ; HOSTILE ALIEN is here?
Present 306 ; NMR SALESMAN is here?
PrintMessage 18 ; Suddenly, the NMR salesman notices the hostile ali
Destroy 307 ; Destroy noun (HOSTILE ALIEN)
Destroy 306 ; Destroy noun (NMR SALESMAN)
TurnFlagON 7 ; Turn flag number 7 ON
TurnCounterOFF 3 ; Turn counter number 3 OFF
PlusScore 100 ; Add 100 to game score
END_COMMAND

COMMAND EAST        
AtLocation 10 ; Player is located at NMR Room
FlagOFF 7 ; Flag number 7 is OFF?
Present 207 ; NMR SAMPLE TUBE is here?
SendToRoom 307 11 ; Put item (HOSTILE ALIEN) in room 11 (Small NMR Room)
PrintMessage 27 ; Suddenly, an ugly, green alien enters the room.  T
END_COMMAND

COMMAND EAST        
AtLocation 10 ; Player is located at NMR Room
IsCarrying 210 ; RAY GUN is being carried?
PrintMessage 15 ; Suddenly, you feel a tremendous tug from the left,
SwapLocations 212 213 ; Swap locations of nouns  (NMR SPECTROMETER) and (NMR SPECTROMETER)
Destroy 210 ; Destroy noun (RAY GUN)
SendToRoom 214 11 ; Put item (RAY GUN) in room 11 (Small NMR Room)
MinusScore 50 ; Subtract 50 from game score
END_COMMAND

COMMAND SOUTH        
AtLocation 18 ; Player is located at Bureaucratic Maze
FlagOFF 1 ; Flag number 1 is OFF?
TurnFlagON 1 ; Turn flag number 1 ON
PrintMessage 5 ; You have finally reached the office of someone who
GoToRoom 19 ; Go to location 19 -- Bureaucratic Maze
PlusScore 75 ; Add 75 to game score
DoneWithTurn
END_COMMAND

COMMAND TURN SAFE TO RIGHT
AtLocation 2 ; Player is located at Office          
GetNumberInput 10 99 ; input number >= 10 and <= 99
END_COMMAND

COMMAND TURN SAFE TO LEFT
AtLocation 2 ; Player is located at Office          
GetNumberInput 10 99 ; input number >= 10 and <= 99
END_COMMAND

COMMAND TURN SAFE TO RIGHT
AtLocation 2 ; Player is located at Office          
NOT VariableGT 1 2 ; Variable number 1 is NOT equal to 2?
NumberEquals 31 ; Input number is equal to 31?
PrintMessage 6 ; OK                                                
SetVariableTo 1 1 ; Set variable number 1 to 1
DoneWithTurn
END_COMMAND

COMMAND TURN SAFE TO RIGHT
AtLocation 2 ; Player is located at Office          
VariableGT 1 2 ; Variable number 1 is equal to 2?
SetVariableTo 1 0 ; Set variable number 1 to 0
NumberEquals 59 ; Input number is equal to 59?
PrintMessage 7 ; Congratulations, the safe is now unlocked!        
UnLockIt 202 ; Unlock noun (LARGE SAFE)
SetVariableTo 1 0 ; Set variable number 1 to 0
PlusScore 75 ; Add 75 to game score
DoneWithTurn
END_COMMAND

COMMAND TURN SAFE TO LEFT
AtLocation 2 ; Player is located at Office          
VariableGT 1 1 ; Variable number 1 is equal to 1?
NumberEquals 41 ; Input number is equal to 41?
PrintMessage 6 ; OK                                                
SetVariableTo 1 2 ; Set variable number 1 to 2
DoneWithTurn
END_COMMAND

COMMAND TURN SAFE TO RIGHT
AtLocation 2 ; Player is located at Office          
PrintMessage 6 ; OK                                                
SetVariableTo 1 0 ; Set variable number 1 to 0
DoneWithTurn
END_COMMAND

COMMAND TURN SAFE TO LEFT
AtLocation 2 ; Player is located at Office          
PrintMessage 6 ; OK                                                
SetVariableTo 1 0 ; Set variable number 1 to 0
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF IN SECRETARY
FlagOFF 3 ; Flag number 3 is OFF?
Present 304 ; PURCHASING SECRETARY is here?
Present 201 ; ALIEN STUFF is here?
SwapLocations 304 305 ; Swap locations of nouns  (PURCHASING SECRETARY) and (BLACK CROW)
PrintMessage 9 ; As the first drop of alien mutagen touches the sec
TurnCounterON 2 ; Turn counter number 2 ON
TurnFlagON 3 ; Turn flag number 3 ON
PlusScore 50 ; Add 50 to game score
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF IN SECRETARY
Present 304 ; PURCHASING SECRETARY is here?
Present 201 ; ALIEN STUFF is here?
PrintMessage 10 ; The stuff has no effect.  Perhaps people become im
MinusScore 10 ; Subtract 10 from game score
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF IN SAMPLE TUBE
Present 201 ; ALIEN STUFF is here?
Present 207 ; NMR SAMPLE TUBE is here?
IsOpen 207 ; NMR SAMPLE TUBE is OPEN?
PrintMessage 25 ; You carefully pour some of the alien mutagen into 
CloseIt 207 ; Close noun (NMR SAMPLE TUBE)
TurnFlagON 8 ; Turn flag number 8 ON
PlusScore 25 ; Add 25 to game score
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF IN SAMPLE TUBE
Present 201 ; ALIEN STUFF is here?
Present 207 ; NMR SAMPLE TUBE is here?
NOT IsOpen 207 ; NMR SAMPLE TUBE is NOT OPEN?
PrintMessage 26 ; The alien stuff runs off of the end cap of the NMR
KillPlayer ; Kill Player at end of turn!
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF    
Present 201 ; ALIEN STUFF is here?
ObjectPresent ;     is here?
MinusScore 10 ; Subtract 10 from game score
AddToVariable 13 1 ; Increase variable number 13 by 1
NOT VariableGT 13 5 ; Variable number 13 is NOT equal to 5?
PrintMessage 11 ; The stuff has no effect.  I guess it doesn't work 
DoneWithTurn
END_COMMAND

COMMAND PUT STUFF    
Present 201 ; ALIEN STUFF is here?
ObjectPresent ;     is here?
Destroy 201 ; Destroy noun (ALIEN STUFF)
PrintMessage 34 ; Now you've done it.  You are all out of alien stuf
DoneWithTurn
END_COMMAND

COMMAND TURN SPECTROMETER    
Present 211 ; NMR SPECTROMETER is here?
FlagOFF 4 ; Flag number 4 is OFF?
PrintMessage 13 ; The computer screen immediately flashes to life, a
TurnFlagON 4 ; Turn flag number 4 ON
DoneWithTurn
END_COMMAND

COMMAND TURN SPECTROMETER    
Present 212 ; NMR SPECTROMETER is here?
FlagOFF 5 ; Flag number 5 is OFF?
PrintMessage 13 ; The computer screen immediately flashes to life, a
TurnFlagON 5 ; Turn flag number 5 ON
PlusScore 5 ; Add 5 to game score
DoneWithTurn
END_COMMAND

COMMAND TURN SPECTROMETER    
Present 211 ; NMR SPECTROMETER is here?
 OR 
Present 212 ; NMR SPECTROMETER is here?
PrintMessage 14 ; The spectrometer is already on.  Stop wasting time
DoneWithTurn
END_COMMAND

COMMAND AMXX32        
NOT AtLocation 19 ; Player is NOT located at Bureaucratic Maze
MakeVarRoomNum 3 ; Set variable number 3 to current room number
PrintMessage 19 ; There is a sudden tremendous cloud of green smoke,
GoToRoom 19 ; Go to location 19 -- Bureaucratic Maze
MinusScore 25 ; Subtract 25 from game score
DoneWithTurn
END_COMMAND

COMMAND AMXX32        
NOT VariableGT 3 0 ; Variable number 3 is NOT equal to 0?
GoToVariableRoom 3 ; Send Player to room number given by variable number 3
SetVariableTo 3 0 ; Set variable number 3 to 0
PrintMessage 20 ; There is a sudden tremendous cloud of green smoke,
MinusScore 25 ; Subtract 25 from game score
DoneWithTurn
END_COMMAND

COMMAND AMXX32        
PrintMessage 35 ; Nothing happens                                   
DoneWithTurn
END_COMMAND

COMMAND ASK CLERK    
AtLocation 27 ; Player is located at Stock Room
PrintMessage 21 ; The clerk does not reply.  He is obviously not int
DoneWithTurn
END_COMMAND

COMMAND GIVE SLIP    
AtLocation 27 ; Player is located at Stock Room
Present 206 ; REQUISITION SLIP is here?
Destroy 206 ; Destroy noun (REQUISITION SLIP)
DropIt 207 ; Drop noun 207 -- NMR SAMPLE TUBE
PrintMessage 22 ; The clerk unfolds the requisition slip and looks i
PlusScore 5 ; Add 5 to game score
DoneWithTurn
END_COMMAND

COMMAND GIVE        
NOUNPresent ; $NOUN$ is here?
PrintMessage 23 ; The $OBJECT$ doesn't seem to want the $NOUN$, and 
DoneWithTurn
END_COMMAND

COMMAND GIVE        
PrintMessage 24 ; What $NOUN$?  You don't even have a $NOUN$ with yo
DoneWithTurn
END_COMMAND

COMMAND PUT SAMPLE TUBE IN SPECTROMETER
AtLocation 10 ; Player is located at NMR Room
Present 207 ; NMR SAMPLE TUBE is here?
TurnFlagON 9 ; Turn flag number 9 ON
PlusScore 5 ; Add 5 to game score
END_COMMAND

COMMAND PUT SAMPLE TUBE IN SPECTROMETER
AtLocation 11 ; Player is located at Small NMR Room
Present 207 ; NMR SAMPLE TUBE is here?
Present 307 ; HOSTILE ALIEN is here?
PrintMessage 33 ; The alien won't let you get near the magnet.  Ever
DoneWithTurn
END_COMMAND

COMMAND PUT SAMPLE TUBE IN SPECTROMETER
AtLocation 11 ; Player is located at Small NMR Room
Present 207 ; NMR SAMPLE TUBE is here?
TurnFlagON 10 ; Turn flag number 10 ON
PlusScore 5 ; Add 5 to game score
END_COMMAND

COMMAND GET SAMPLE TUBE    
AtLocation 10 ; Player is located at NMR Room
 OR 
AtLocation 11 ; Player is located at Small NMR Room
Present 207 ; NMR SAMPLE TUBE is here?
TurnFlagOFF 9 ; Turn flag number 9 OFF
TurnFlagOFF 10 ; Turn flag number 10 OFF
MinusScore 5 ; Subtract 5 from game score
END_COMMAND

COMMAND MEASURE        
AtLocation 10 ; Player is located at NMR Room
FlagON 4 ; Flag number 4 is ON?
FlagON 8 ; Flag number 8 is ON?
FlagON 9 ; Flag number 9 is ON?
PrintMessage 28 ; A large message appears on the display screen:    
Destroy 207 ; Destroy noun (NMR SAMPLE TUBE)
SwapLocations 215 211 ; Swap locations of nouns  (NMR SPECTROMETER) and (NMR SPECTROMETER)
ChangePassageway    3   0; Change WEST passage TO Room number 0 (Nowhere)
MinusScore 50 ; Subtract 50 from game score
DoneWithTurn
END_COMMAND

COMMAND MEASURE        
AtLocation 11 ; Player is located at Small NMR Room
FlagON 5 ; Flag number 5 is ON?
FlagON 8 ; Flag number 8 is ON?
FlagON 10 ; Flag number 10 is ON?
PrintMessage 29 ;                                                   
PlusScore 10 ; Add 10 to game score
WinGame ; Player wins game at end of turn
DoneWithTurn
END_COMMAND

COMMAND MEASURE        
AtLocation 10 ; Player is located at NMR Room
FlagON 4 ; Flag number 4 is ON?
PrintMessage 30 ; You measure a spectrum, but there is no NMR signal
DoneWithTurn
END_COMMAND

COMMAND MEASURE        
AtLocation 11 ; Player is located at Small NMR Room
FlagON 5 ; Flag number 5 is ON?
PrintMessage 30 ; You measure a spectrum, but there is no NMR signal
DoneWithTurn
END_COMMAND

COMMAND MEASURE        
AtLocation 10 ; Player is located at NMR Room
 OR 
AtLocation 11 ; Player is located at Small NMR Room
PrintMessage 31 ; Nothing happens.  The spectrometer appears to be t
DoneWithTurn
END_COMMAND

COMMAND MEASURE        
PrintMessage 32 ; That doesn't make any sense right now!            
DoneWithTurn
END_COMMAND

COMMAND FIRE ALIEN    
Present 303 ; HOSTILE ALIEN is here?
Present 210 ; RAY GUN is here?
PlusScore 25 ; Add 25 to game score
END_COMMAND

COMMAND CLOSE SAFE    
NOT AtLocation 2 ; Player is NOT located at Office          
ReDirectTo OPEN SAFE    
END_COMMAND

COMMAND OPEN SAFE    
NOT AtLocation 2 ; Player is NOT located at Office          
PrintMessage 39 ; Don't bother with telling me to open and close doo
DoneWithTurn
END_COMMAND

COMMAND HINT        
FlagOFF 12 ; Flag number 12 is OFF?
TurnFlagON 12 ; Turn flag number 12 ON
PrintMessage 36 ; Before you start asking for hints, be sure you hav
DoneWithTurn
END_COMMAND

COMMAND HINT        
PrintMessage 37 ; Pick a topic, and I'll give you a hint.  There are
MinusScore 5 ; Subtract 5 from game score
GetNumberInput 1 9 ; input number >= 1 and <= 9
END_COMMAND

COMMAND HINT        
NumberEquals 1 ; Input number is equal to 1?
VariableLT 4 65 ; Variable number 4 is less than 65?
PrintVariableMessage    4; Print message number given by Variable number 4
AddToVariable 4 1 ; Increase variable number 4 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 2 ; Input number is equal to 2?
VariableLT 5 74 ; Variable number 5 is less than 74?
PrintVariableMessage    5; Print message number given by Variable number 5
AddToVariable 5 1 ; Increase variable number 5 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 3 ; Input number is equal to 3?
VariableLT 6 82 ; Variable number 6 is less than 82?
PrintVariableMessage    6; Print message number given by Variable number 6
AddToVariable 6 1 ; Increase variable number 6 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 4 ; Input number is equal to 4?
VariableLT 7 93 ; Variable number 7 is less than 93?
PrintVariableMessage    7; Print message number given by Variable number 7
AddToVariable 7 1 ; Increase variable number 7 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 5 ; Input number is equal to 5?
VariableLT 8 104 ; Variable number 8 is less than 104?
PrintVariableMessage    8; Print message number given by Variable number 8
AddToVariable 8 1 ; Increase variable number 8 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 6 ; Input number is equal to 6?
VariableLT 9 114 ; Variable number 9 is less than 114?
PrintVariableMessage    9; Print message number given by Variable number 9
AddToVariable 9 1 ; Increase variable number 9 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 7 ; Input number is equal to 7?
VariableLT 10 126 ; Variable number 10 is less than 126?
PrintVariableMessage    10; Print message number given by Variable number 10
AddToVariable 10 1 ; Increase variable number 10 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 8 ; Input number is equal to 8?
VariableLT 11 135 ; Variable number 11 is less than 135?
PrintVariableMessage    11; Print message number given by Variable number 11
AddToVariable 11 1 ; Increase variable number 11 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
NumberEquals 9 ; Input number is equal to 9?
VariableLT 12 144 ; Variable number 12 is less than 144?
PrintVariableMessage    12; Print message number given by Variable number 12
AddToVariable 12 1 ; Increase variable number 12 by 1
DoneWithTurn
END_COMMAND

COMMAND HINT        
PrintMessage 38 ;                                                   
PlusScore 5 ; Add 5 to game score
DoneWithTurn
END_COMMAND


REM  ----  Flags, Counters, and Variables Used

REM  ----  Flags Used
REM  Flag 1
REM  Flag 2
REM  Flag 3
REM  Flag 4
REM  Flag 5
REM  Flag 6
REM  Flag 7
REM  Flag 8
REM  Flag 9
REM  Flag 10
REM  Flag 11
REM  Flag 12
REM  Flag 13

REM  ----  Counters Used
REM  Counter 1
REM  Counter 2
REM  Counter 3

REM  ----  Variables Used
REM  Variable 1
REM  Variable 2
REM  Variable 3
REM  Variable 4
REM  Variable 5
REM  Variable 6
REM  Variable 7
REM  Variable 8
REM  Variable 9
REM  Variable 10
REM  Variable 11
REM  Variable 12
REM  Variable 13

